﻿using System;
using System.Collections.Generic;
using System.Text;

using MapCenterSystem.DataInfo;
using MapCenterSystem.DataAccess;
using MapCenterSystem.DefineType;

namespace MapCenterSytem.Process
{
    public class PlaceEx : Place
    {

        public static PlaceInfo GetPlaceById(int id)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.GetPlaceById(id);
        }

        public static IList<PlaceInfo> GetPlaceByKeyword(String keyword)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.GetPlaceByKeyword(keyword);
        }

        public static IList<PlaceInfo> GetPlaceByTypeAndDistance(int placeTypeID, Coordinate location, int limit)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.GetPlaceByTypeAndDistance(placeTypeID, location, limit);
        }

        public static IList<PlaceInfo> GetPlaceByTypeAndAddress(int placeTypeID, string address)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.GetPlaceByTypeAndAddress(placeTypeID, address);
        }
        public static IList<PlaceInfo> GetPlaceByTypeAround(int placeTypeID, Coordinate location, float distance)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.GetPlacebyTypeAround(placeTypeID, location, distance);
        }
        public static int AddPlace(PlaceInfo place)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.AddPlace(place);
        }

        public static bool UpdatePlace(PlaceInfo place)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.UpdatePlace(place);
        }

        public static bool UpdatePlacePicture(int id, string picName)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.UpdatePlacePicture(id, picName);
        }

        public static bool DeletePlace(int id)
        {
            PlaceServiceEx ps = new PlaceServiceEx();
            return ps.DeletePlace(id);
        }
    }
}
